package com.warm.spring.bean.hero;

import com.warm.spring.bean.equip.Equip;
import com.warm.spring.bean.skill.Skill;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;

/**
 * @Description 奥巴马 -- Constructor
 * @Author iyb-liangchuang
 * @Date 2021/5/10 14:24
 */
@Component
public class ObamaHero extends Hero {

    public static RoleEnum ROLE = RoleEnum.ADC;

    private Equip equip;
    private Skill skill;

    public ObamaHero() {
    }

    /** 指定具体注入的bean @Autowired + @Qualifier */
    @Autowired
    public ObamaHero(@Qualifier("gunEquip") Equip equip, @Qualifier("obamaSkill") Skill skill){
        this.equip = equip;
        this.skill = skill;
    }

    @Override
    public void figth(){
        System.out.println("Hero: Obama, Role: " + ROLE + ", Attack: " + attack(equip, skill));
    }
}
